package com.twu.biblioteca;

public class User {
    private String libraryNumber;
    private  String name;
    private String password;
    private String email;
    private String phone;

    public User(String libraryNumber, String name, String password, String email, String phone) {
        this.libraryNumber = libraryNumber;
        this.name = name;
        this.password = password;
        this.email = email;
        this.phone = phone;
    }

    public boolean login(String libraryNumber, String password){
        if(this.password.equals(password) && this.libraryNumber.equals(libraryNumber)) return true;
        return false;
    }

    @Override
    public String toString() {
        return libraryNumber + "\t" + name + "\t" + email + "\t" + phone;

    }
}
